package jdk8;

import adv410.Student;

import java.util.function.Consumer;

/**
 * @author oldliu
 * @since 1.0
 */
public class ConsumerTest {
    public static void main(String[] args) {
        Student s=new Student();
        s.setAge(23);
        s.setName("老刘");
        s.setQq("13333");

        MyC c=(o)->{
            o.accept(s);
        };
        c.doOp(x->{
            x.setAge(x.getAge()+1);
        });
        System.out.println(s);
    }
}
interface MyC{
    void doOp(Consumer<Student> s);
}
